package com.kun.constant;

/**
 * 系统安全公共常量
 *
 * @author kun.li
 */
public interface SecurityConstant {
    /**
     * 权限规则
     */
    String SYS_AUTHORITIES_RULE = "sys_authorities_rule";

    /**
     * 认证头
     */
    String AUTHORIZATION = "Authorization";
    /**
     * jwt的归属者
     */
    String SUB = "sub";
    /**
     * 用户信息
     */
    String USERINFO = "userInfo";

    String AUTHORITIES = "authorities";

    String USER_NAME = "username";

    /**
     * 客户端ID
     */
    String CLIENT_ID = "clientId";

    /**
     * 协议字段
     */
    String DETAILS_LICENSE = "license";
    /**
     * 项目的license
     */
    String PROJECT_LICENSE = "https://kuncloud.com";
    /**
     * 认证头内容前缀
     */
    String BEARER = "Bearer ";
    // ========= 请求头
    String USERNAME = "username";

    String USERID = "userId";

    String ROLES = "roles";
    /**
     * 租户ID
     */
    String TENANT_ID = "tenantId";

    /**
     * 是否是超管
     */
    String HAS_ADMIN = "hasAdmin";


    /**
     * 租户默认角色名称
     */
    String TENANT_ADMIN_ROLE_NAME = "管理员";
    /**
     * 租户默认角色码
     */
    String TENANT_ADMIN_ROLE_CODE = "ROLE_ADMIN";

    /**
     * 超级管理员ID
     */
    Long SUPER_ADMIN_ID = 1L;

    /**
     * 平台租户
     */
    String DEFAULT_TENANT = "1";


    /**
     * 授权码模式confirm
     */
    String CUSTOM_CONSENT_PAGE_URI = "/token/consent";

    /**
     * swagger ui 地址默认放过
     */
    String WHITE_STATE_URI = "/css/**,/css/*,/doc.html,/swagger-ui.html,/webjars/**,/v3/api-docs/**,/*/v3/api-docs/**,/favicon.ico,/actuator/**";
}
